package com.summerxia.dateselector.wheelview;

import android.content.Context;

import java.util.Arrays;
import java.util.List;

public class NewsClassifyAdapter implements WheelAdapter {

	private List<String> classifys;
	private Context context;

	public NewsClassifyAdapter(Context context){
		this.context = context;
	}

	@Override
	public int getItemsCount() {
		return classifys == null ? 0 : classifys.size();
	}

	@Override
	public String getItem(int index) {
		return index <= classifys.size() - 1 ? classifys.get(index) : null;
	}

	@Override
	public int getMaximumLength() {
		return 40;
	}

	public List<String> getClassifys() {
		return classifys;
	}

	public void setClassifys(List<String> classifys) {
		this.classifys = classifys;
	}

	@Override
	public String getCurrentId(int index) {
		return "" + index;
	}
}
